package com.jinly.ryder.account.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jinly.ryder.account.dao.entity.UserAuthDO;
import com.jinly.ryder.common.auth.model.AuthType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserAuthMapper extends BaseMapper<UserAuthDO> {

    @Select("select distinct  auth_type from user_auth where user_id=#{userId} and yn=true")
    List<AuthType> selectUserAuthTypes(@Param("userId") Long userId);
}
